<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Ajax初体验</title>
</head>
<body>
    <button id="btn">点击提交</button>
    <div id="box"></div>
    <script src="./lib/jquery.js"></script>
    <script type="text/javascript">
    //点击按钮，向服务器发送请求
    $("#btn").click(function() {
        $.ajax({
            url: 'http://www.liulongbin.top:3006/api/getbooks',
            success: function(res) {
$("#box").html(res.msg)
            }
        })
    })
    
    
    </script>
    
</body>
</html>